CC=g++
DEBUG=-g
CFLAGS=-Wall -c $(DEBUG)
LFLAGS=-Wall
INCLUDES=-I/usr/include
LIBS=-L/usr/lib -llog4cpp -ljansson -lpq -lvmime

C_HEADERS=

C_SRCS=main.cpp \
ImaLogger.cpp \
ImaConf.cpp \
ImaDbInterface.cpp \
ImaEMailNotifier.cpp \
ImaMqInterface.cpp



OBJS=main.o \
ImaLogger.o \
ImaConf.o \
ImaDbInterface.o \
ImaEmailNotifier.o \
ImaMqInterface.o

all: notification_engine

notification_engine: $(OBJS)
	$(CC) $(OBJS) $(LIBS) $(LFLAGS) $(DEBUG) -o notification_engine
	rm -rf *.o

%.o: %.cpp
	@echo 'Building file: $<'
	@echo 'Invoking g++ compiler'
	$(CC) -g $(CFLAGS) $(INCLUDES) $(DEBUG) -o"$@" "$<"


clean:
	rm -rf *.o notification_engine


